package com.woniu.his.service.impl;

import com.woniu.his.dao.DocterInfoMapper;
import com.woniu.his.entity.DocterInfo;
import com.woniu.his.entity.SectionInfo;
import com.woniu.his.dao.SectionInfoMapper;
import com.woniu.his.service.ISectionInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author TATO
 * @since 2019-11-25
 */
@Service
public class SectionInfoServiceImpl extends ServiceImpl<SectionInfoMapper, SectionInfo> implements ISectionInfoService {

    @Autowired
    private SectionInfoMapper sectionInfoMapper;

    @Autowired
    private DocterInfoMapper docterInfoMapper;
    /**
     *@描述
     *@参数  根据传进来的二级科室的名字查找对应的医生姓名
     *@返回值  
     *@创建人  li
     *@创建时间  2019/11/25 0025
     *@修改人和其它信息
     */
    @Override
    public List<DocterInfo> findDoctorByTwoSectionName(int sectionId) {
//        根据科室id拿到对应的的医生信息
        List<DocterInfo> docters = docterInfoMapper.findDoctersBySectionId(sectionId);
        System.out.println("根据科室id拿到的所有的医生"+docters);
        return docters;
    }
}
